package tech.lixinlei.collection.list.contains;

import tech.lixinlei.collection.list.contains.bo.ListItem;

import java.util.ArrayList;
import java.util.List;

public class ContainsDemo {

    public static void main(String[] args) {
        List<ListItem> lists = new ArrayList<>();
        ListItem item = new ListItem();
        item.setId(1);
        item.setName("leilei");
        lists.add(item);

        ListItem item1 = new ListItem();
        item1.setId(1);
        item1.setName("leilei");

        System.out.println(lists.contains(item1));
    }

}
